<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .v-cloak{
            display: none;
        }
    </style>
</head>
<body>
    <!-- v-cloak防止载入时闪动 -->
    <div id="root" v-cloak>
        <h1>sccxsdsd</h1>
        <div v-html="myHtml"></div>
        <div v-text="myText"></div>
        <div v-once>我只会渲染一次</div>
        <h1>{{num}}</h1>
        <button @click="num++">点我+1</button>
        <!-- vue不渲染内部数据原样输出 -->
        <h1 v-pre>{{data}}</h1>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        new Vue({
            el: '#root',
            data: {
                myHtml: '<h1>你好</h1>',
                myText: '我不好',
                num: 0,

            }
        })
    </script>
</body>
</html>